home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / MacGambit 2.0 / sources1 / README < prev    next >
Encoding:
Text File  |  1993-02-05  |  12.7 KB  |  115 lines  |  [TEXT/KAHL]

  1. e located in the
  2.   program itself.  <strategy> can be: block or separate.
  3.  
  4. ([not] standard-bindings <var>...)
  5.  
  6.   The given global variables are known (or not known) to be equal
  7.   to the value defined for them in the dialect (all variables defined
  8.   in the standard if none specified).
  9.  
  10. ([not] extended-bindings <var>...)
  11.  
  12.   The given global variables are known (or not known) to be equal
  13.   to the value defined for them in the runtime system (all variables
  14.   defined in the runtime if none specified).
  15.  
  16. ([not] safe)
  17.  
  18.   Generate (or don't generate) code that will prevent fatal runtime
  19.   errors.  Note that in `safe' mode certain semantic errors will not be
  20.   checked as long as they can't crash the system.  For example
  21.   the primitive `char=?' could disregard the type of its arguments in
  22.   `safe' (as well as `not safe') mode.
  23.  
  24. ([not] intr-checks)
  25.  
  26.   Generate (or don't generate) interrupt checks.  Interrupt checks are
  27.   used to signal the need for a garbage collection, to catch user
  28.   interrupts and also to check for stack overflows.  Interrupt checking
  29.   should not be turned off casually.
  30.  
  31. (<number-type> <prim>...)
  32.  
  33.   Numeric arguments and result of specified primitives are known to be
  34.   of the given type (all primitives if none specified).
  35.   <number-type> can be: generic or fixnum.
  36.  
  37.  
  38. The default declarations used by the compiler are:
  39.  
  40.   (ieee-scheme)
  41.   (lambda-lift)
  42.   (separate)
  43.   (not standard-bindings)
  44.   (not extended-bindings)
  45.   (not safe)
  46.   (intr-checks)
  47.   (generic)
  48.  
  49. These declarations are compatible with the IEEE-Scheme standard.
  50. Typically used declarations that enhance performance (at the cost of
  51. violating the IEEE-Scheme standard) are: (standard-bindings) and
  52. (fixnum).
  53.  
  54. The diagnostic messages produced by GSC are printed on the interaction
  55. window.  When the compiler detects an error, it pops up a window with
  56. the erroneous source file and highlights the location of the error.
  57.  
  58. The code generated by GSC is very efficient.  Speedups of a factor of 100
  59. over interpreted code are not uncommon.
  60.  
  61.  
  62. A useful feature of object files is that they can be run by
  63. double-clicking them.  This is essentially equivalent to starting the
  64. interpreter and loading the given object file (except that the
  65. "init.scm" file is not loaded and a read-eval-print loop is not entered).
  66.  
  67. As an example, compile the file "pi.scm" producing the object file
  68. "pi.O".  Now, quit the compiler and double-click the file "pi.O".  This
  69. will run the program.  Note that when "pi.scm" logically terminates
  70. execution, the interpreter also exits.
  71.  
  72.  
  73. E. Using the MacGambit Linker
  74. -----------------------------
  75.  
  76. The MacGambit linker is used to build a Macintosh application program
  77. from a runtime library and a certain number of object files produced by
  78. the MacGambit compiler (there is an upper limit of 64 object files).  The
  79. files to be linked can either be entered interactively or with a
  80. "link script".
  81.  
  82. Interactive use:
  83.   The MacGambit linker first prompts for the runtime library file (you
  84.   should normally use `Runtime') and then for a set of object files.  The
  85.   name of the application is the same as the name of the last object file
  86.   to be linked with its `.O' file extension stripped off.
  87.  
  88. With a "link script":
  89.   A link script is a file containing the names of the files to link (one name
  90.   per line).  The first line contains the name of the runtime library file.
  91.   The following lines name the object files.  In addition, the name of the
  92.   application can be specified by putting it at the end of the script, after
  93.   a blank line.
  94.  
  95. When the linked program is launched, the effect is similar to loading
  96. each of the object files, in sequence, in the interpreter (except that
  97. the "init.scm" file is not loaded and a read-eval-print loop is not entered
  98. (unless of course you link in the object file "mac_toplevel.O" in the folder
  99. "Interpreter (.O)"))).
  100.  
  101. Linking examples:
  102.  
  103. 1) link the library "Runtime" with the object file "pi.O" to get the
  104.    application "pi".  Note that when "pi.scm" logically terminates,
  105.    the program exits to the finder.
  106.  
  107. 2) link the library "Runtime" with the object files "queens.O" and
  108.    "mac_toplevel.O" to add the procedure "queens" to the interpreter.
  109.  
  110.  
  111. Distribution restrictions
  112. -------------------------
  113.  
  114. Read the "About MacGambit" dialog box.
  115.